app.controller('vipIntegralTaskPageCtrl',function($scope,$state,PopupService,$stateParams,$http,$myconfig,$timeout,$ionicConfig){
    //获取上一页面传送参数
    $scope.taskName = $stateParams.name;

    //向服务器请求数据详情
    $scope.taskMes = function(name){
        $http.get($myconfig.api.base_host + '/integralrule/integralrule_info?rule_id=' + name)
        .then(function(res){
            if(res.data.success){
                $scope.MesData = res.data.data;
            }else{
                $scope.err = res.data.data;
            }
        });
    };

    // 如果获得上一页面传递的参数 则执行请求详情
    if($scope.taskName){
        $scope.taskMes($scope.taskName);
    };
    $scope.$on('$ionicView.enter', function(){

        $ionicConfig.views.swipeBackEnabled(false);

    });

});
